<html ng-app="myApp"> <!-- 定义整个angulajs使用的上下文环境 -->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>AngulaJs</title>
    <script type="text/javascript" src="angular/angular.js"></script>
</head>
<body>
<div ng-controller="myController">
    <table border="1">
        <tr>
            <td>书名</td>
            <td>价格</td>
        </tr>
        <tr ng-repeat="temp in books | orderBy:'price'">
            <td>{{temp.title}}</td>
            <td>{{temp.price}}</td>
        </tr>
    </table>
</div>
<script type="text/javascript">
    var app = angular.module("myApp", []); // 定义模块
    app.controller("myController", function ($scope) {
        $scope.books = [
            {title: 'java', price: 66.66},
            {title: 'oracle', price: 88.66},
            {title: 'anglurjs', price: 34.66},
            {title: 'java web', price: 76.66}
        ];
    });
</script>
</body>
</html>
